home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / today35.zip / PUSHDIR.DOC < prev    next >
Text File  |  1987-09-06  |  1KB  |  33 lines

  1. PUSHDIR is a two program set that lets you save your current
  2. directory, without knowing what it is, and restoring it at some
  3. later time.
  4.  
  5. This is very handy for running a program from one directory and
  6. automatically returning to whichever directory you were in before
  7. running the program.  And without having to manually keep track of
  8. where you were.  This lets you put general batch files in one
  9. directory where instead of in each application directory.
  10.  
  11.  
  12. To use the programs in you BAT file do the following:
  13.  
  14.    1.  Before changing directories, insert the following command:
  15.               PUSHD \NEWDIR
  16.        where \NEWDIR is the directory to which you wish to go.
  17.        This will save your current directory and move you to the
  18.        desired new directory.
  19.    2.  Run whatever program you wish.
  20.    3.  Insert the command POPD after the program command line(s).
  21.        You will be returned to your original directory.
  22.  
  23. EXAMPLE:
  24.  
  25. echo off
  26. pushd \today
  27. today clear %1
  28. popd
  29.  
  30. This little batch file will run TODAY, which must be run from its
  31. own directory (\TODAY) where database files are found.  Upon
  32. completion, you will be returned to whatever directory you were in.
  33.